package com.tosh.model;

import java.util.Collections;
import java.util.List;

/**
 * User: arsentyev
 * Date: 02.08.12
 */
public class Bean {
    private final String id;
    private final String clazz;
    private final List<ConstructorArg> constructorArgs;
    private final List<Property> properties;

    public Bean(String id, String clazz) {
        this.clazz = clazz;
        this.id = id;
        this.constructorArgs = Collections.emptyList();
        this.properties = Collections.emptyList();
    }

    public Bean(String id, String clazz, List<Property> properties, List<ConstructorArg> constructor) {
        this.id = id;
        this.clazz = clazz;
        this.constructorArgs = constructor;
        this.properties = properties;
    }

    public String getClazz() {
        return clazz;
    }

    public String getId() {
        return id;
    }

    public List<Property> getProperties() {
        return properties;
    }

    public void addProperty(Property property) {
        this.properties.add(property);
    }

    public List<ConstructorArg> getConstructorArgs() {
        return constructorArgs;
    }
}